package componentes;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.ItemListener;
import javax.swing.JComboBox;
import javax.swing.JPanel;
import javax.swing.DefaultComboBoxModel;

/**
 * @author Reynald0
 */
public class CompComboBox extends JComboBox<String>
{
   public CompComboBox(JPanel pPanel,String[] pEtiquetas,ItemListener pEvento)
   {
      setFont(new Font("Calibri",Font.PLAIN,12));
      setBackground(Color.ORANGE);
      this.setModel(new DefaultComboBoxModel<String>(pEtiquetas));
      this.addItemListener(pEvento);
      // if(pPanel!=null)pPanel.getContentPane().add(this);
      if(pPanel!=null) pPanel.add(this);
   }
}
